package com.resign.carl.iterator;

import com.google.common.collect.Lists;
import com.resign.carl.iterator.api.Menu;
import com.resign.carl.iterator.api.impl.DinerMenu;
import com.resign.carl.iterator.api.impl.PancakeHouseMenu;
import com.resign.carl.iterator.api.Waitress;

import java.util.List;

/**
 *
 * 迭代器模式  ###################
 * Created by carl.zhao on 2016/6/16.
 */
public class Client {

    public static void main(String[] args) {
        List<Menu> menus = Lists.newArrayList();
        menus.add(new DinerMenu());
        menus.add(new PancakeHouseMenu());
        Waitress waitress = new Waitress(menus);
        waitress.printMenu();
    }
}
